package com.app.mapper;

import com.app.pojo.Item;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ItemMapper {
    @Select("select * from `Item` where item_id = #{item_id}")
    List<Item> list(int item_id);
    @Insert("insert into `Item` (item_account,item_total,item_detail,item_name,item_img) values (#{item_account},#{item_total},#{item_detail},#{item_name},#{item_img})  ")
    void add(Item item);
    @Delete("delete from `Item` where item_id = #{item_id}")
    void delete(int item_id);
    @Update("update `Item` set item_account = #{item_account},item_total = #{item_total},item_detail = #{item_detail},item_name = #{item_name},item_img = #{item_img} where item_id = #{item_id}")
    void update(Item item);
    @Select("select * from `Item`")
    List<Item> selectAll();
}
